//任务三 java依赖注入 对应上方两个java

import com.example.demo.dao.impl.Java02Impl;
import com.example.demo.dao.impl.JavaImpl;
import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class java_test {
    @Test
    public void test05(){
        System.out.println("Java 注入测试");
        ApplicationContext context=new AnnotationConfigApplicationContext(Java02Impl.class);
        JavaImpl Hao=context.getBean(JavaImpl.class);
        Hao.setPlayer("lamelo ball");
        Hao.display();
    }
}
